﻿<!DOCTYPE html>
<!--[if lte IE 8]>              <html class="ie8 no-js" lang="en">     <![endif]-->
<!--[if IE 9]>					<html class="ie9 no-js" lang="en">     <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html class="not-ie no-js" lang="en">
<!--<![endif]-->
<head>
    <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Open+Sans:400,600,700|Oswald|Electrolize' rel='stylesheet' type='text/css' />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

    <title>Car Dealer | One Products</title>

    <meta name="description" content="" />
    <meta name="author" content="" />

    <link rel="shortcut" href="images/favicon.ico" />
    <link rel="stylesheet" href="css/style.css" media="screen" />
    <link rel="stylesheet" href="css/galleriffic.css" media="screen" />
    <link rel="stylesheet" href="css/skeleton.css" media="screen" />
    <link rel="stylesheet" href="fancybox/jquery.fancybox.css" media="screen" />

    <!-- HTML5 Shiv + detect touch events -->
    <script type="text/javascript" src="js/modernizr.custom.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body class="menu-1 h-style-1 text-1">

    <div class="wrap">

        <!-- - - - - - - - - - - - - - Header - - - - - - - - - - - - - - - - -->

        <header id="header" class="clearfix">

            <a href="index.html" id="logo"><img src="images/logo.png" alt="Car Dealer" /></a>

            <div class="widget-container widget_search">

                <span class="call"><span>（+86）</span> 18888888888</span><br />

                <span class="adds">北京市海淀区上地七街北京八维研修学院软工教学楼38404</span>

                <form action="#" id="searchform" method="get">

                    <p>
                        <input type="text" id="s" placeholder="Search" />
                        <button type="submit" id="searchsubmit"></button>
                    </p>

                </form><!--/ #searchform-->

            </div><!--/ .widget-container-->

            <nav id="navigation" class="navigation">

                <ul>
                    <li class="current-menu-item"><a href="index.html" class="active">首页</a></li>
                    <li>
                        <a href="all-listings.html">买车</a>
                    </li>
                    <li>
                        <a href="blog.html">博客</a>
                        <ul>
                            <li><a href="blog.html">博客</a></li>
                            <li><a href="blog-single.html">博客单</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="news1.html">新闻</a>
                        <ul>
                            <li><a href="alternative-blog.html">新闻时事</a></li>
                            <li><a href="image-and-floats.html">新车上市</a></li>
                        </ul>
                    </li>
                    <li><a href="sales-reps.html">销售代表</a></li>
                    <!--<li>
                        <a href="#">页面</a>
                        <ul>

                            <li><a href="404.html">404 页面</a></li>
                            <li><a href="image-and-floats.html">图像和浮动</a></li>
                            <li><a href="pricing-table.html">定价表</a></li>

                        </ul>
                    </li>-->
                    <li><a href="contact.html">联系人</a></li>

                </ul>

            </nav><!--/ #navigation-->

        </header><!--/ #header-->
        <!-- - - - - - - - - - - - - - end Header - - - - - - - - - - - - - - - - -->


        <div class="main">

            <!-- - - - - - - - - - - - - - - Container - - - - - - - - - - - - - - - - -->

            <section class="container sbl clearfix">

                <!-- - - - - - - - - - - - - - - Content - - - - - - - - - - - - - - - - -->

                <section id="content" class="twelve columns">

                    <article class="item clearfix">

                        <!--车辆名-->
                        <h2 id="title" class="title"></h2>

                        <div id="gallery" class="gallery">

                            <div id="thumbs" class="clearfix">

                            </div>

                        </div><!--/ #gallery-->

                        <div id="list" class="extra" style="float:right;margin-right:50px;margin-top:50px;">

                        </div><!--/ .extra-->

                        <div class="entry-item">


                            <h3 class="section-title">文信息</h3>

                            <p>
                                Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                                Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                                consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
                                nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
                                mollit anim. Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
                                magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.
                            </p>

                            <p>
                                Labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                                nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
                                esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
                                in culpa qui officia deserunt mollit anim. Consectetur adipisicing elit, sed do eiusmod tempor
                                incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
                            </p>

                            <form method="post" action="" class="comments-form" />

                            <p class="input-block">
                                <button class="button orange" type="submit" id="submit">购买</button>
                            </p>

                            </form><!--/ .contact-form-->

                        </div><!--/ .entry-item-->

                    </article><!--/ .item-->

                </section><!--/ #content-->
                <!-- - - - - - - - - - - - - - end Content - - - - - - - - - - - - - - - - -->
                <!-- - - - - - - - - - - - - - - Sidebar - - - - - - - - - - - - - - - - -->

                <aside id="sidebar" class="four columns">

                    <div class="widget-container widget_custom_search">

                        <h3 class="widget-title">快速检索</h3>

                        <form action="/" id="boxpanel" class="form-panel" />

                        <fieldset>
                            <label for="manufacturer">品牌:</label>
                            <input type="text" id="GoodsPai" />
                        </fieldset>

                        <fieldset>
                            <label for="minprice">最低价(万):</label>
                            <input type="text" id="MinPrice" />
                        </fieldset>

                        <fieldset>
                            <label for="maxprice">最高价(万):</label>
                            <input type="text" id="MaxPrice" />
                        </fieldset>

                        <fieldset>
                            <label for="mileage">里程（公里）:</label>
                            <input type="text" id="GoodsMileage" />
                        </fieldset>

                        <fieldset>
                            <label for="bodytype">车型:</label>
                            <select id="CarsModel">
                                <option value="0">请选择</option>
                            </select>
                        </fieldset>

                        <div class="clear" style=""></div>
                        <button id="submitSearch" class="submit-search" type="button" onclick="cha(1,9)">搜索</button>

                        <!--/ .form-panel-->

                    </div><!--/ .widget-container-->
                    
                    <div class="widget-container widget_recent_entries">

                        <h3 class="widget-title">最新资讯</h3>

                        <ul>
                            <li><a href="#">Lorem ipsum dolor sit amet, consectetur adipisicing</a></li>
                            <li><a href="#">Ipsum dolor sit amet, consectetur adipisicing</a></li>
                            <li><a href="#">Set magna ipsum dolor sit amet, consectetur adipisicing</a></li>
                        </ul>

                        <a href="#" class="see">查看更多资讯</a>

                    </div><!--/ .widget-container-->

                </aside><!--/ #sidebar-->
                <!-- - - - - - - - - - - - - end Sidebar - - - - - - - - - - - - - - - - -->

            </section><!--/.container -->
            <!-- - - - - - - - - - - - - end Container - - - - - - - - - - - - - - - - -->

        </div><!--/ .main-->
        <!-- - - - - - - - - - - - - - - Footer - - - - - - - - - - - - - - - - -->

        <footer id="footer" class="container clearfix">

            <section class="container clearfix">

                <div class="four columns">

                    <div class="widget-container widget_text">

                        <h3 class="widget-title">关于我们</h3>

                        <div class="textwidget">

                            <p class="white">
                                我们是专业的二手车在线交易服务提供商。
                            </p>

                            <p>
                                我们的核心业务涵盖了二手车网络交易、二手车电商零售平台，以及二手车金融衍生服务。我们集团致力于为中国二手车行业的发展做出贡献，利用互联网及移动互联网技术，推动和建立中国未来二手车市场的诚信与高效。
                            </p>

                        </div><!--/ .textwidget-->

                        <a href="#" class="see">阅读更多</a>

                    </div><!--/ .widget-container-->

                </div><!--/ .four .columns-->

                <div class="four columns">

                    <div class="widget-container widget_text">

                        <h3 class="widget-title">我们的时间</h3>

                        <div class="textwidget">

                            <ul class="hours">

                                <li>星期一 <span>8 上午 到 7 下午</span></li>
                                <li>星期二 <span>8 上午 到 9 下午</span></li>
                                <li>星期三 <span>8 上午 到 9 下午</span></li>
                                <li>星期四 <span>8 上午 到 9 下午</span></li>
                                <li>星期五 <span>8 上午 到 9 下午</span></li>
                                <li>星期六 <span>8 上午 到 9 下午</span></li>
                                <li>星期日 <span>休息</span></li>

                            </ul><!--/ .hours-->

                        </div><!--/ .textwidget-->

                    </div><!--/ .widget-container-->

                </div><!--/ .four .columns-->

                <div class="four columns">

                    <div class="widget-container widget_contacts">

                        <h3 class="widget-title">我们的联系人</h3>

                        <ul class="our-contacts">

                            <li class="address">
                                <b>地址：</b>
                                <p>北京市海淀区上地七街</p>
                            </li>
                            <li class="phone">
                                <b>电话:</b>&nbsp;<span>18611306272</span> <br />
                                <b>QQ在线客服:</b><br />
                                <b><img src="images/QQ图片20170417184407.jpg" width="15" height="15" border=0 align=middle><a class='qqb' href='tencent://message/?uin=1798316088&Site=心殤的狼，卻痛入骨髓&Menu=yes'>技术QQ:</a></b><br />
                                <b><img src="images/QQ图片20170417184407.jpg" width="15" height="15" border=0 align=middle><a class='qqb' href='tencent://message/?uin=1007762278&Site=*一杯烈酒&Menu=yes'>业务QQ:</a></b>

                            </li>
                            <li>
                                <b><a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=IBEXGRgTERYQGBhgUVEOQ09N" style="text-decoration:none;">给我写信</a></b><br />

                                <b><a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=IBEXGRgTERYQGBhgUVEOQ09N" style="text-decoration:none;"><img src="http://rescdn.qqmail.com/zh_CN/htmledition/images/function/qm_open/ico_mailme_12.png" /></a></b>

                            </li>

                        </ul><!--/ .our-contacts-->

                    </div><!--/ .widget-container-->

                </div><!--/ .four .columns-->

                <div class="four columns">

                    <div id="gMap"></div>

                </div><!--/ .four .columns-->

                <div class="adjective clearfix">

                    <p class="copyright">版权所有 &copy; 2013. 第二项目组 </p>

                </div><!--/ .adjective-->

            </section><!--/ .container-->

        </footer><!--/ #footer-->
        <!-- - - - - - - - - - - - - - - end Footer - - - - - - - - - - - - - - - - -->

    </div><!--/ .wrap-->





    <script src="js/jquery-1.10.2.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery-1.10.2.min.js"><\/script>')</script>
    <!--[if lt IE 9]>
        <script src="js/selectivizr-and-extra-selectors.min.js"></script>
    <![endif]-->
    <script src="js/jquery.galleriffic.js"></script>
    <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script src="js/jquery.gmap.min.js"></script>
    <script src="js/custom.js"></script>

</body>
</html>
<script src="js/jquery-1.9.1.min.js"></script>
<script>
    $(function () {

        var select = '';
        $.ajax({
            type: "get",
            url: "http://localhost:5819/api/CarsModels/GetCarsModelsShow",
            success: function (msg) {

                for (var i = 0; i < msg.length; i++) {
                    select += '<option value="' + msg[i]["CarsModelID"] + '">' + msg[i]["CarsModelName"] + '</option>';
                }
                $("#CarsModel").append(select);
            }
        })
        fen(1, 9)
    })
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    } s
    function fen(a, b) {


        var ti = "";
        var img = '';
        var li = '';
        $.ajax({
            type: "get",
            url: "http://localhost:5819/api/Goods/GetBuyCar",
            data: {
                PageIndex: a,
                PageSize: b
            },
            success: function (msg) {

                $(msg.Db).each(function (i, j) {
                    if (j.GoodsID == GetQueryString("id")) {
                        ti += '' + j.GoodsSet + ''

                        img += ' <a href="one-products.html" class="single-image picture">'
                        img += ' <img src="' + j.GoodsImage + '" alt="" width="700" height="300" />'
                        
                        li += ' <ul class="list type-1">'
                        li += ' <b class="heading">价格:</b>'
                        li += '    <span class="cost">$' + j.GoodsPrice + '</span>'
                        li += '        <li><b>车牌号码: </b><span>' + j.GoodsPai + '</span></li>'
                        li += '        <li><b>车速: </b><span>' + j.GoodsMileage + '</span></li>'
                        li += '        <li><b>车型: </b><span>' + j.GoodsType + '</span></li>'
                        li += '        <li><b>车龄: </b><span>' + j.GoodsNewOrOld + '</span></li>'
                        li += '        <li><b>车主: </b><span>' + j.UsersID + '</span></li>'
                        li += ' </ul>'
                    }
                })
                $("#list").html("");
                $("#list").html(li)

                $("#title").html("");
                $("#title").html(ti)

                $("#thumbs").html("");
                $("#thumbs").html(img)
            }
        })
    }
    function cha(i, j) {

        var GoodsPai = $("#GoodsPai").val();
        var MinPrice = $("#MinPrice").val();
        var MaxPrice = $("#MaxPrice").val();
        var GoodsMileage = $("#GoodsMileage").val();
        var CarsModel = $("#CarsModel").val();
        var ti = "";
        var img = '';
        var li = '';
        if (GoodsPai == "") {
            alert("品牌不能为空！");
            return;

        }
        if (MinPrice == "") {
            alert("最低价不能为空！");
            return;

        }
        if (MaxPrice == "") {
            alert("最高价不能为空！");
            return;

        }

        if (GoodsMileage == "") {
            alert("行驶里程不能为空！");
            return;
        }
        if (CarsModel == "") {
            alert("车型不能为空！");
        }
        else {
            $.ajax({
                type: "get",
                url: "http://localhost:5819/api/Goods/GetSelectGoodsList",
                data: {
                    GoodsType: GoodsPai,
                    MinPrice: MinPrice,
                    MaxPrice: MaxPrice,
                    GoodsMileage: GoodsMileage,
                    CarsModel: CarsModel,
                    PageIndex: i,
                    PageSize: j
                },
                success: function (msg) {
                    $(msg.Db).each(function (i, j) {
                        ti += '' + j.GoodsSet + ''

                        img += ' <a href="one-products.html" class="single-image picture">'
                        img += ' <img src="' + j.GoodsImage + '" alt="" />'

                        li += ' <ul class="list type-1">'
                        li += ' <b class="heading">价格:</b>'
                        li += '    <span class="cost">$' + j.GoodsPrice + '</span>'
                        li += '        <li><b>车牌号码: </b><span>' + j.GoodsPai + '</span></li>'
                        li += '        <li><b>车速: </b><span>' + j.GoodsMileage + '</span></li>'
                        li += '        <li><b>车型: </b><span>' + j.GoodsType + '</span></li>'
                        li += '        <li><b>车龄: </b><span>' + j.GoodsNewOrOld + '</span></li>'
                        li += '        <li><b>车主: </b><span>' + j.UsersID + '</span></li>'
                        li += ' </ul>'
                    })
                    $("#list").html("");
                    $("#list").html(li)

                    $("#title").html("");
                    $("#title").html(ti)

                    $("#thumbs").html("");
                    $("#thumbs").html(img)
                }

            })
        }
    }
</script>
